﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="deliveryWay.aspx.cs" Inherits="WebApp.admin.basic.deliveryWay" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>
        <%Response.Write(GetTitle()); %>
    </title>
    <link href="../css/skin.css" rel="stylesheet" type="text/css" />
</head>

<script type="text/javascript" src="../js/main.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>

<script type="text/javascript">
    $(function () {
        $("#btnSubmit").click(function () {
            if ($("#txtDeliveryWayName").val() == "") {
                $("#txtDeliveryWayName").select();
                alert("请输入配送方式名称！");
                return false;
            }
            if ($("#selectLogisticsCompany").val() == "0") {
                $("#selectLogisticsCompany").focus();
                alert("请输入默认物流公司！");
                return false;
            }
            if ($("#txtSortOrder").val() == "") {
                $("#txtSortOrder").select();
                alert("请输入排序！");
                return false;
            }
            if ($("#txtaIntroduce").val().length > 100) {
                $("#txtSortOrder").select();
                alert("介绍最多不能超过100个字符！");
                return false;
            }
            return true;
        });
    });
</script>

<body class="body">
    <table class="main" cellpadding="0" cellspacing="0">

        <tr>

            <td class="td_middle_middle">
                <div class="maincontent">
                  <div  class="navgater"><img src="../images/module.gif" width="20" height="22" alt=""/>
                      所在位置：配送方式->
                      <%= Request.QueryString["ot"] == "ed" ? "配送方式编辑" : "配送方式添加"%>
                      <a style=" display:block; float:right;" href="javascript:location.href=document.referrer;" ><img src="../images/history.gif" border="0" /></a>
                  </div>
                    <form id="form1" runat="server">
                        <table cellpadding="0" cellspacing="0" style="width: 100%">
                            <tr>
                                <td class="td_title">
                                    配送方式名称：</td>
                                <td class="td_content">
                                    <input id="txtDeliveryWayName" name="userName" type="text" runat="server" maxlength="20" />*最多20个字符</td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    默认物流公司：</td>
                                <td class="td_content">
                                    <select id="selectLogisticsCompany" name="logisticsCompany">
                                        <option value="0">请选择物流公司...</option>
                                        <% Response.Write(LogisticsCompanyBind()); %>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    排序：</td>
                                <td class="td_content">
                                    <input id="txtSortOrder" type="text" runat="server" onpaste="return false" style="ime-mode:disabled"
                                        onkeypress="if ((event.keyCode<48 || event.keyCode>57||event.keyCode==46)) event.returnValue=false" />*</td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    介绍：</td>
                                <td class="td_content">
                                    <textarea id="txtaIntroduce" runat="server" cols="20" rows="2"></textarea>最多100个字符</td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Button ID="btnSubmit" runat="server" Text="确  定" CssClass="formButton" OnClick="btnSubmit_Click"
                                       />&nbsp;&nbsp;&nbsp;&nbsp;
                                      <input id="btnBack" type="button" class="formButton" value=" 返  回 " onclick="javascript:location.href=document.referrer;"  /></td>
                            </tr>
                        </table>
                    </form>
                </div>
            </td>

        </tr>

    </table>
</body>
</html>
